<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>随访档案记录</title>
  <link rel="stylesheet" href="../../lib/layui-v2.6.3/css/layui.css" media="all">
  <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
  </script>
  <!-- <link rel="stylesheet" hrf="./../css/public.css" media="all"> -->
</head>
<style>
  .layui-form-label {
    width: 150px !important;
    text-align: center !important;
  }

  .layui-input-block {
    margin-left: 150px !important;
  }
</style>

<body>
  <div class="layuimini-container">
    <div class="layuimini-main">
      <div id="nofr" class="layui-hide">
        <div class="layui-form-item">
          <fieldset class="layui-elem-field layui-field-title">
            <legend><a class="layui-form-mid layui-word-aux" style="font-size: 15px;" name="color-design">随访记录标注</a>
            </legend>
          </fieldset>
        </div>
        <h3 style="text-align:center">
          目前还没有随访过，请提醒病人上传图片
        </h3>
      </div>
      <!-- <fieldset class="table-search-fieldset"> -->
      <div style="margin: 10px 10px 10px 10px" id="hadfr">
        <div class="layui-form-item">
          <div class="row">
            <div class="layui-col-xs4 layui-col-sm5 layui-col-md5">
              <div class="layui-form layui-form-pane">
                <div class="layui-inline">
                  <label class="layui-form-label layui-bg-green" >随访记录</label>
                  <div class="layui-input-block">
                    <select name = "frlist" id = "frlist" lay-search lay-filter="submit-frlabel">
                    </select>
                  </div>
                </div>
              </div>
            </div>
            <div class="layui-col-xs4 layui-col-sm7 layui-col-md7" id="showbasicbutton">
              <div style="text-align:center">
                <button type="button" class="layui-btn" onclick="showbasic()">展开基本信息</button>
              </div>
            </div>
            <div class="layui-col-xs4 layui-col-sm7 layui-col-md7" id="showbasicbutton">
              <div id="showmorebutton">
                <div id="nomoreinfo" class="layui-hide" style="text-align:center">
                  <i class="layui-icon layui-icon-tips" style="font-size: 15px; color: hsl(32, 100%, 56%);">
                    没有附加信息图片，请提醒病人添加
                  </i>  
                </div>
                <div id="havemoreinfo" style="text-align:center">
                  <button type="button" class="layui-btn" style="margin-left:20px" onclick="showmore()">展示附加信息</button>
                </div>  
            </div>
          </div>
          <div class="layui-row" style="margin-top:10px" id="basicinfo">
            <div class="layui-col-xs4 layui-col-sm7 layui-col-md7" id="basepic" style="margin-top:5px">
              <div class="layui-row">
                <h2 >基本信息及电极信息</h2>
                <i class="layui-icon layui-icon-add-circle" id="biggerbase"></i> 
                <i class="layui-icon layui-icon-reduce-circle" id="smallerbase"></i> 
              </div>
              <div style="height:380px; overflow:auto">
                <p  style="text-align:center;vertical-align:middle">
                  <img id="baseimg" alt="test" class="baseimg"/>
                </p>
              </div>
            </div>
            <div class="layui-col-xs4 layui-col-sm5 layui-col-md5" style="height:400px; overflow:auto" id="baselabel">
              <div class="layui-form layui-form-pane" action="">
                <fieldset class="layui-elem-field layui-field-title">
                  <legend><a class="layui-form-mid layui-word-aux" style="font-size: 15px;" name="color-design">基本随访信息</a>
                  </legend>
                </fieldset>
                  <div class="layui-form-item">
                    <div class="layui-inline">
                      <label class="layui-form-label">所属随访次数</label>
                      <div class="layui-input-block">
                        <input type="text" id="more_frCount" name="frCount" autocomplete="off" autocomplete="off"
                          class="layui-input" disabled>
                      </div>
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <div class="layui-inline">
                      <label class="layui-form-label">随访日期</label>
                      <div class="layui-input-block">
                        <input type="text" id="more_date" name="date" autocomplete="off" autocomplete="off"
                        class="layui-input date-time" placeholder="点击以选择" lay-verify="datetime|required">
                      </div>
                    </div>
                    <div class="layui-inline">
                      <label class="layui-form-label">随访医生</label>
                      <div class="layui-input-block">
                        <select name = "doctor" id = "more_doctor" lay-search lay-verify="number">
                        </select>
                      </div>
                    </div>
                  </div>
                  <div class="layui-form-item">
                      <label class="layui-form-label" >随访种类</label>
                      <div class="layui-input-inline" style="width: 30%;">
                        <input type="radio" name="type" value="0" title="常规" checked >
                        <input type="radio" name="type" value="1" title="不适随访" >
                      </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">患者状态评价</label>
                    <div class="layui-input-block">
                      <input type="radio" name="comment" value="0" title="一般" checked>
                      <input type="radio" name="comment" value="1" title="很好">
                      <input type="radio" name="comment" value="2" title="较差">
                    </div>
                  </div>
                  <div class="layui-form-item" style="width: 95%;">
                    <label class="layui-form-label">临床表现</label>
                    <div class="layui-input-block">
                      <textarea   id="more_performance" name="performance" 
                        class="layui-textarea" lay-verify="required"></textarea>
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <div class="layui-inline">
                      <label class="layui-form-label">电池状态</label>
                      <div class="layui-input-block">
                        <input type="radio" name="batteryState" value="0" title="OK" checked >
                        <input type="radio" name="batteryState" value="1" title="ERI" class="dis-base ">
                      </div>
                    </div>
                    <div class="layui-inline">
                      <label class="layui-form-label">剩余电量</label>
                      <div class="layui-input-block">
                        <input type="text" id="more_lqElectricity" name="lqElectricity" autocomplete="off" autocomplete="off"
                          class="layui-input" lay-verify="required|percent_wr">
                      </div>
                    </div>
                  </div>
                  <div class="layui-form-item" style="width: 95%;">
                    <div class="layui-inline">
                      <label class="layui-form-label">预估寿命</label>
                      <div class="layui-input-block">
                        <input type="text" id="more_batteryLife" name="batteryLife" autocomplete="off" autocomplete="off"
                          class="layui-input" lay-verify="required">
                      </div>
                    </div>
                    <div class="layui-inline">
                      <label class="layui-form-label">起搏模式</label>
                      <div class="layui-input-block">
                        <input type="text" id="more_pacemakerPattern" name="pacemakerPattern" autocomplete="off" autocomplete="off"
                          class="layui-input" lay-verify="required">
                      </div>
                    </div>
                  </div>
                  <div class="layui-form-item" style="width: 95%;">
                    <div class="layui-inline">
                      <label class="layui-form-label">低限频率</label>
                      <div class="layui-input-block">
                        <input type="text" id="more_minFrequency" name="minFrequency" autocomplete="off" autocomplete="off"
                          class="layui-input" lay-verify="required|wireRe_f">
                      </div>
                    </div>
                    <div class="layui-inline">
                      <label class="layui-form-label">上限跟踪频率</label>
                      <div class="layui-input-block">
                        <input type="text" id="more_maxFrequency" name="maxFrequency" autocomplete="off" autocomplete="off"
                          class="layui-input" lay-verify="required|wireRe_f">
                      </div>
                    </div>
                  </div>
                  <div class="layui-form-item" style="width: 95%;">
                    <div class="layui-inline">
                      <label class="layui-form-label">电压</label>
                      <div class="layui-input-block">
                        <input type="text" id="more_volts" name="volts" autocomplete="off" autocomplete="off"
                          class="layui-input" lay-verify="required|wireRe_f">
                      </div>
                    </div>
                  </div>
                  <div class="layui-form-item" style="width: 95%;">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea   id="more_note" name="note" class="layui-textarea"></textarea>
                    </div>
                  </div>
                  <div class="layui-form-item" style="width: 95%;">
                    <label class="layui-form-label">建议</label>
                    <div class="layui-input-block">
                      <textarea   id="more_suggest" name="suggest" class="layui-textarea"></textarea>
                    </div>
                  </div>
                  <div style="position: absolute; right: 17px;">
                    <button id="more_closebtn" type="button" class="layui-btn" style="margin-right: 0;" lay-submit
                    lay-filter="follow_record_submit">保存提交</button>
                    <!--这个按钮是隐藏起来被图标调用进行装饰的-->
                    <button id="more_closebtn" type="button" class="layui-btn layui-hide" style="margin-right: 0;" lay-submit
                    lay-filter="follow_record_state">保存提交</button>
                  </div>
      
              </div>
              <div class="layui-form layui-form-pane" action="">
                <fieldset class="layui-elem-field layui-field-title" style="margin-top:45px">
                  <legend><a class="layui-form-mid layui-word-aux" style="font-size: 15px;" name="color-design">电极信息</a>
                  </legend>
                </fieldset>
                <fieldset class="layui-elem-field layui-hide " id="more_wirePosition_1">
                  <legend style="font-size: 15px;color: gray;">右心房</legend>
                  <div class="layui-field-box">
                    <div class="layui-form-item">
                      <div class="layui-inline">
                        <label class="layui-form-label">阈值(v)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_thresholds_1" name="thresholds_1" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rawirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">脉宽(ms)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_pulsewidth_1" name="pulsewidth_1" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rawirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">P//R波(mv)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_prwave_1" name="prwave_1" autocomplete="off_1" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rawirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">起搏阻抗(Ω)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_pacingImpedance_1" name="pacingImpedance_1" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rawirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">起搏百分比(%)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_pacingPercent_1" name="pacingPercent_1" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rawirecheck|percent_wr">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">感知百分比(%)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_perceptualPercent_1" name="perceptualPercent_1" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rawirecheck|percent_wr">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">除颤阻抗(Ω)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_defibrillationImpedance_1" name="defibrillationImpedance_1" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rawirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">输出电压(V)//脉宽(ms)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_tdpw_1" name="tdpw_1" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rawirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">感知灵敏度(mv)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_perceptualSensitivity_1" name="perceptualSensitivity_1" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rawirecheck|wireRe_f">
                        </div>
                      </div>
                    </div>
                    <div class="layui-form-item" style="width: 95%;">
                      <label class="layui-form-label">备注</label>
                      <div class="layui-input-block">
                        <textarea id="more_note_1" name="note_1" class="layui-textarea dis-wire"></textarea>
                      </div>
                    </div>
                  </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-hide" id="more_wirePosition_2">
                  <legend style="font-size: 15px;color: gray;">右心室</legend>
                  <div class="layui-field-box">
                    <div class="layui-form-item">
                      <div class="layui-inline">
                        <label class="layui-form-label">阈值(v)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_thresholds_2" name="thresholds_2" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">脉宽(ms)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_pulsewidth_2" name="pulsewidth_2" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">P//R波(mv)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_prwave_2" name="prwave_2" autocomplete="off_2" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">起搏阻抗(Ω)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_pacingImpedance_2" name="pacingImpedance_2" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">起搏百分比(%)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_pacingPercent_2" name="pacingPercent_2" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rvwirecheck|percent_wr">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">感知百分比(%)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_perceptualPercent_2" name="perceptualPercent_2" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rvwirecheck|percent_wr">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">除颤阻抗(Ω)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_defibrillationImpedance_2" name="defibrillationImpedance_2" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">输出电压(V)//脉宽(ms)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_tdpw_2" name="tdpw_2" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">感知灵敏度(mv)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_perceptualSensitivity_2" name="perceptualSensitivity_2" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="rvwirecheck|wireRe_f">
                        </div>
                      </div>
                    </div>
                    <div class="layui-form-item" style="width: 95%;">
                      <label class="layui-form-label">备注</label>
                      <div class="layui-input-block">
                        <textarea id="more_note_2" name="note_2" class="layui-textarea dis-wire"></textarea>
                      </div>
                    </div>
                  </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-hide" id="more_wirePosition_3">
                  <legend style="font-size: 15px;color: gray;">左心室</legend>
                  <div class="layui-field-box">
                    <div class="layui-form-item">
                      <div class="layui-inline">
                        <label class="layui-form-label">阈值(v)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_thresholds_3" name="thresholds_3" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="lvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">脉宽(ms)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_pulsewidth_3" name="pulsewidth_3" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="lvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">P//R波(mv)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_prwave_3" name="prwave_3" autocomplete="off_3" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="lvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">起搏阻抗(Ω)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_pacingImpedance_3" name="pacingImpedance_3" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="lvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">起搏百分比(%)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_pacingPercent_3" name="pacingPercent_3" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="lvwirecheck|percent_wr">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">感知百分比(%)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_perceptualPercent_3" name="perceptualPercent_3" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="lvwirecheck|percent_wr">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">除颤阻抗(Ω)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_defibrillationImpedance_3" name="defibrillationImpedance_3" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="lvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">输出电压(V)//脉宽(ms)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_tdpw_3" name="tdpw_3" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="lvwirecheck|wireRe_f">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">感知灵敏度(mv)</label>
                        <div class="layui-input-block">
                          <input type="text" id="more_perceptualSensitivity_3" name="perceptualSensitivity_3" autocomplete="off" autocomplete="off"
                            class="layui-input dis-wire" lay-verify="lvwirecheck|wireRe_f">
                        </div>
                      </div>
                    </div>
                    <div class="layui-form-item" style="width: 95%;">
                      <label class="layui-form-label">备注</label>
                      <div class="layui-input-block">
                        <textarea id="more_note_3" name="note_3" class="layui-textarea dis-wire"></textarea>
                      </div>
                    </div>
                  </div>
                </fieldset>
                <div style="position: absolute; right: 17px;">
                  <button id="save_wirefollow" type="button" class="layui-btn" style="margin-right: 0;" lay-submit
                    lay-filter="save_wirefollow">保存提交</button>
                </div>
              </div>
            </div>
          </div>
          <div class="layui-row" id="moreinfo">
            <div class="layui-col-xs4 layui-col-sm7 layui-col-md7" id="moreinfopic">
              <h2>附加信息</h2>
              <i class="layui-icon layui-icon-add-circle" id="biggermore"></i> 
              <i class="layui-icon layui-icon-reduce-circle" id="smallermore"></i> 
              <div style="height:380px; overflow:auto">
                <p style="text-align:center;vertical-align:middle">
                  <img id="hrimg" alt="test" class="hrimg"/>
                </p>
              </div>
            </div>
            <div class="layui-col-xs4 layui-col-sm5 layui-col-md5" style="height:400px; overflow:auto">
              <div class="layui-form layui-form-pane" action="">
                <fieldset class="layui-elem-field layui-field-title" style="margin-top:45px">
                  <legend><a class="layui-form-mid layui-word-aux" style="font-size: 15px;" name="color-design">附加随访信息</a>
                  </legend>
                </fieldset>
                <div class="layui-form-item" style="height: 8%;">
                  <label class="layui-form-label">附加信息</label>
                    <div class="layui-input-block" >
                    <input type="checkbox" name="more_info" value="1" title="心脏超声" lay-skin="primary" id = "more_heartsound"
                      lay-filter="more_info" class = "dis-heart">
                  </div>
                </div>
                <div id="hrnote" class="layui-hide">
                  <p style="font-size:large;margin-left:200px">取消勾选意味着您选择删除附加心脏超声信息</p>
                </div>
                <fieldset class="layui-elem-field layui-hide" id="more_heartUltrasound">
                  <legend style="font-size: 15px;color: gray;">心脏超声</legend>
                    <div class="layui-form-item">
                        <label class="layui-form-label" >心脏大小变化</label>
                        <div class="layui-input-block">
                          <input type="radio" name = "heartSize" value="1" title="不变" checked class = "dis-heart">
                          <input type="radio" name = "heartSize" value="2" title="变大" class = "dis-heart">
                          <input type="radio" name = "heartSize" value="3" title="变小" class = "dis-heart">
                        </div>
                    </div>
                    <div class="layui-form-item">
                    <div class="layui-inline">
                      <label class="layui-form-label">LA</label>
                      <div class="layui-input-block">
                        <input type="text" id="la" name="la" autocomplete="off" autocomplete="off"
                          class="layui-input dis-heart" lay-verify="more" lay-verify="hrcheck|wireRe_f">
                      </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" >LA状态</label>
                        <div class="layui-input-block">
                          <input type="radio" name = "las" value="1" title="正常" checked class = "dis-heart">
                          <input type="radio" name = "las" value="2" title="异常" class = "dis-heart">
                        </div>
                    </div>
                    <div class="layui-inline">
                      <label class="layui-form-label">LV</label>
                      <div class="layui-input-block">
                        <input type="text" id="lv" name="lv" autocomplete="off" autocomplete="off"
                          class="layui-input dis-heart" lay-verify="hrcheck|wireRe_f">
                      </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" >LV状态</label>
                        <div class="layui-input-block">
                          <input type="radio" name = "lvs" value="1" title="正常" checked class = "dis-heart">
                          <input type="radio" name = "lvs" value="2" title="异常" class = "dis-heart">
                        </div>
                    </div>
                    <div class="layui-inline">
                      <label class="layui-form-label">RA</label>
                      <div class="layui-input-block">
                        <input type="text" id="ra" name="ra" autocomplete="off" autocomplete="off"
                          class="layui-input dis-heart" lay-verify="hrcheck|wireRe_f">
                      </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" >RA状态</label>
                        <div class="layui-input-block">
                          <input type="radio" name = "ras" value="1" title="正常" checked class = "dis-heart">
                          <input type="radio" name = "ras" value="2" title="异常" class = "dis-heart">
                        </div>
                    </div>
                    <div class="layui-inline">
                      <label class="layui-form-label">RV</label>
                      <div class="layui-input-block">
                        <input type="text" id="rv" name="rv" autocomplete="off" autocomplete="off"
                          class="layui-input dis-heart" lay-verify="hrcheck|wireRe_f">
                      </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" >RV状态</label>
                        <div class="layui-input-block">
                          <input type="radio" name = "rvs" value="1" title="正常" checked class = "dis-heart">
                          <input type="radio" name = "rvs" value="2" title="异常" class = "dis-heart">
                        </div>
                    </div>
                    <div class="layui-inline">
                      <label class="layui-form-label">FS(%)</label>
                      <div class="layui-input-block">
                        <input type="text" id="fs" name="fs" autocomplete="off" autocomplete="off"
                          class="layui-input dis-heart" lay-verify="hrcheck|percent_wr">
                      </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" >FS状态</label>
                        <div class="layui-input-block">
                          <input type="radio" name = "fss" value="1" title="正常" checked class = "dis-heart">
                          <input type="radio" name = "fss" value="2" title="异常" class = "dis-heart">
                        </div>
                    </div>
                    <div class="layui-inline">
                      <label class="layui-form-label">EF(%)</label>
                      <div class="layui-input-block">
                        <input type="text" id="ef" name="ef" autocomplete="off" autocomplete="off"
                          class="layui-input dis-heart" lay-verify="hrcheck|percent_wr">
                      </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" >EF状态</label>
                        <div class="layui-input-block">
                          <input type="radio" name = "efs" value="1" title="正常" checked class = "dis-heart">
                          <input type="radio" name = "efs" value="2" title="异常" class = "dis-heart">
                        </div>
                    </div>
                  </div>
                  <div class="layui-form-item" style="width: 95%;">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                      <textarea id="heart_note" name="note_4"  class="layui-textarea dis-heart" lay-verify=""></textarea>
                    </div>
                  </div>
                  <div style="position: absolute; right: 17px;">
                    <button id="save_heart" type="button" class="layui-btn" style="margin-right: 0;" lay-submit
                    lay-filter="save_heart">保存提交</button>
                  </div>
                </fieldset>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div style="text-align:center" id="showchange">
        <button type="button" class="layui-btn" onclick="showchange()">
          图片有问题？需要修改？
        </button>
      </div> 
      <div class="layui-form layui-form-pane" action="" lay-filter="changestate" id="tochangestate">
        <div style="text-align:center">
          <div class="layui-form-item" style="width:50%;margin-left:240px">
            <div class="layui-input-block">
              <textarea   id="stateNote" name="stateNote" placeholder="请输入修改建议"
                class="layui-textarea" lay-verify="required"></textarea>
            </div>
          </div>
        </div>
        <div style="text-align:center" >
          <button id="more_closebtn" type="button" class="layui-btn" style="margin-top: 10px;" lay-submit
          lay-filter="follow_record_state"> 退回修改 </button>
        </div>
      </div>  
      <!-- </fieldset> -->
    </div>
  </div>
</body>
<script>
    var i=0
    var j=0
    var height=380
    //放大图片
    //基本图
    $("#biggerbase").click(function(){
      i++
	    $('.baseimg').css('height',height+i*50)
    });
    $("#biggermore").click(function(){
      i++
	    $('.hrimg').css('height',height+i*50)
    });
    //缩小图片
    //基本图
    $("#smallerbase").click(function(){
      if(i>0){i--}
      else{i=0}
	    $('.baseimg').css('height',height+i*50)
    });
    $("#smallermore").click(function(){
      if(i>0){i--}
      else{i=0}
	    $('.hrimg').css('height',height+i*50)
    });
    //修改附加信息
    function showbasic(){
      $("#showbasicbutton").hide(200)
      $("#basicinfo").show(200)
      $("#moreinfo").hide(200)
      $("#showmorebutton").show(200)
    }
    function showmore(){
      $("#showmorebutton").hide(200)
      $("#basicinfo").hide(200)
      $("#moreinfo").show(200)
      $("#showbasicbutton").show(200)
    }
    function showchange(){
      $("#showchange").hide(200)
      $("#tochangestate").show(200)
    }
    Date.prototype.format = function(fmt) { 
      var o = { 
          "M+" : this.getMonth()+1,                 //月份 
          "d+" : this.getDate(),                    //日 
          "h+" : this.getHours(),                   //小时 
          "m+" : this.getMinutes(),                 //分 
          "s+" : this.getSeconds(),                 //秒 
          "q+" : Math.floor((this.getMonth()+3)/3), //季度 
          "S"  : this.getMilliseconds()             //毫秒 
      }; 
      if(/(y+)/.test(fmt)) {
              fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 
      }
      for(var k in o) {
          if(new RegExp("("+ k +")").test(fmt)){
              fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
          }
      }
      return fmt; 
    }

    var data_origin_lable
    var mrIdStore 
    var frIdStore
    var raIdStore
    var rvIdStore
    var lvIdStore
    var hrIdStore
    var this_privilege

  //初始化下拉栏的菜单
    function setListLable(fr_id_in){
      //初始化标注记录下拉栏  
      layui.$.ajax({
        url: `${url_basic}/followRecord/followlist`,
        method:'post',
        // url: "/api/frlist.json" ,
        // method:'get',
        data:JSON.stringify({"mrId":mrIdStore}),    //向后端传递档案的id
        contentType:'application/json',
        success: function (data, textStatus) {
          var followlist=data.data
          document.getElementById("frlist").innerHTML = "";
          for (let index = 0; index < followlist.length; index++) {
            const element = followlist[index];
            var newOption = document.createElement("option");
            newOption.text = "第"+element.frCount+'次： '+(new  Date(element.date)).format("yyyy-MM-dd hh:mm");
            newOption.value = element.id;
            document.getElementById("frlist").add(newOption);
          }
          $("#frlist").val(fr_id_in)
            layui.form.render("select");
            return true;
        },
        error: function (xhr, errorText, errorType) {
          //console.log(errorType)
          layer.msg('更新清单失败（与服务器连接失败）');
        },
        dataType: "json"
      })
      //初始化医生下拉栏
      layui.$.ajax({
          url: `${url_basic}/doctor/all?onlySelect=id,name`,
          type: "POST",
          contentType: 'application/json',
          success: function (data, textStatus) {
            if (data.code == 0) {
              document.getElementById("more_doctor").innerHTML = "";
              for (let index = 0; index < data.data.length; index++) {
                const element = data.data[index];
                var newOption = document.createElement("option");
                newOption.text = element.name;
                newOption.value = element.id;
                document.getElementById("more_doctor").add(newOption);
              }
              layui.form.render("select");
              return true;
            }
            else {
              layer.msg('失败，原因：' + data.msg);
              return false;
            }
          },
          error: function (xhr, errorText, errorType) {
            //console.log(errorType)
            layer.msg('更新清单失败（与服务器连接失败）');
          },
          dataType: "json"
        })
    }

    layui.use(['laydate', 'form', 'jquery', 'table'], function () {
      var laydate = layui.laydate,
        form = layui.form,
        table = layui.table,
        $ = layui.$;
      //layui时间选择器
      var datatime_elems = document.getElementsByClassName("date-time")
      for (var i = 0; i < datatime_elems.length; i++) {
          laydate.render({
              elem: datatime_elems[i]
              , type: 'datetime'
          });
      }


      //执行一个laydate实例
      laydate.render({
        elem: '#publication_data' //指定元素
      });
      form.verify({
        rawirecheck:function (value) {
          if (data_origin_lable.raWireFollowRecord!=0) {
            if(value.length<1)
            {return '请输入右心室电极相关必填信息';}
          }
        },
        rvwirecheck:function (value) {
          if (data_origin_lable.rvWireFollowRecord!=0) {
            if(value.length<1)
            {return '请输入右心室电极相关必填信息';}
          }
        },
        lvwirecheck:function (value) {
          if (data_origin_lable.lvWireFollowRecord!=0) {
            if(value.length<1)
            {return '请输入左心室电极相关必填信息';}
          }
        }
        , hrcheck:function (value) {
            var checked=document.getElementById("more_heartsound"); 
            if(checked.checked){
              if(value.length<1)
              {return '请输入心脏超声相关必填消息';}
            }
          }
        //输入浮点数的限制
        ,wireRe_f:[
          /^[0-9][0-9]*([\.][0-9]{1,2})?$|^(\d{0})?$/
          , '请输入正确的小数格式'
          ]
        //输入不大于100的百分比的限制
        ,percent_wr:function (value) {
          var regu = /^[0-9][0-9]*([\.][0-9]{1,2})?$|^(\d{0})?$/
          if (regu.test(value)) {
            if (value<0||value>100) {
              return '请输入0~100以内的数值，可包含小数部分';
            }
          }
          else{
            return '请输入0~100以内的数值，可包含小数部分';
          }
        }
      });

      //心脏超声要不要删
      form.on('checkbox(more_info)', function (data) {
        if (data.elem.checked) {
          $("#more_heartUltrasound").removeClass("layui-hide")
          $("#hrnote").addClass("layui-hide")
        }else{
          $("#more_heartUltrasound").addClass("layui-hide")
          $("#hrnote").removeClass("layui-hide")
        }
      });

      var followRecordContent = ['id','mrId','frCount','image','date','doctor','type','performance','batteryState','batteryLife','pacemakerPattern','minFrequency','maxFrequency','note','suggest','volts','lqElectricity','comment'];
      var followRecordWirecontent_3 = ['frId_3','position_3','thresholds_3','pulsewidth_3','prwave_3','pacingImpedance_3','pacingPercent_3','perceptualPercent_3','defibrillationImpedance_3','tdpw_3','perceptualSensitivity_3','note_3']
      var followRecordWirecontent_2 = ['frId_2','position_2','thresholds_2','pulsewidth_2','prwave_2','pacingImpedance_2','pacingPercent_2','perceptualPercent_2','defibrillationImpedance_2','tdpw_2','perceptualSensitivity_2','note_2']
      var followRecordWirecontent_1 = ['frId_1','position_1','thresholds_1','pulsewidth_1','prwave_1','pacingImpedance_1','pacingPercent_1','perceptualPercent_1','defibrillationImpedance_1','tdpw_1','perceptualSensitivity_1','note_1']
      var heartUltrasoundContent = ['id','frId','image','heartSize','la','las','lv','lvs','ra','ras','rv','rvs','fs','fss','ef','efs','note_4']

      //选择了哪一个随访记录
      form.on('select(submit-frlabel)', function(data){
        $.ajax({
          // url: "/api/follow_detail2.json" ,
          // method:'get',
          url: `${url_basic}/followRecord/getOne` ,
          type: "POST",
          data:JSON.stringify({"frId":data.value}),   //传了id号
          contentType: 'application/json',
          success: function (data, textStatus) {
            setDataLable(data,mrIdStore,this_privilege)
          },
          error: function (xhr, errorText, errorType) {
            //console.log(errorType)
            layer.msg('修改失败（与服务器连接失败）');
          },
        })
      })
      //状态信息的修改
      form.on('submit(follow_record_state)', function (data) {
        //因为这里不用全填完就可以提交，所以我就拿现在网页上显示的value填了
        data.field['frCount']=document.getElementById('more_frCount').value
        data.field['date']=document.getElementById('more_date').value 
        data.field['doctor']=document.getElementById('more_doctor').value 
        data.field['performance']=document.getElementById('more_performance').value
        data.field['batteryLife']=document.getElementById('more_batteryLife').value 
        data.field['minFrequency']=document.getElementById('more_minFrequency').value
        data.field['maxFrequency']=document.getElementById('more_maxFrequency').value
        data.field['pacemakerPattern']=document.getElementById('more_pacemakerPattern').value
        data.field['note']=document.getElementById('more_note').value 
        data.field['suggest']=document.getElementById('more_suggest').value
        if($('input:radio[name=type]')[0].checked){
          data.field['type']=0
        }
        else{
          data.field['type']=1
        }
        if($('input:radio[name=batteryState]')[0].checked){
          data.field['type']=0
        }
        else{
          data.field['type']=1
        }
        for (var key in data.field) {
          if (data.field[key] === '')
            delete data.field[key]
        }
        var followRecordAll = {};
        data.field["id"] = frIdStore    //随访记录id
        data.field["mrId"] = mrIdStore    //随访档案id

        $.each(data.field,function (key,val){
          if(followRecordContent.includes(key)){
            followRecordAll[key] = val;
          }
        })
        followRecordAll['state'] = 3
        followRecordAll['stateNote']=data.field['stateNote']
        $.ajax({
          url: `${url_basic}/followRecord/update`,
          type: "POST",
          data: JSON.stringify(followRecordAll),
          contentType: 'application/json',
          success: function (data, textStatus) {

            if (data.code == 0) {
              layer.msg('记录状态修改成功', { time: 0.5 * 1000 }, function () { });
              return true;
            }
            else {
              layer.msg('失败，原因：' + data.msg);
              return false;
            }
          },
          error: function (xhr, errorText, errorType) {
            //console.log(errorType)
            layer.msg('修改失败（与服务器连接失败）');
          },
          dataType: "json"
        })
        return false;
      });
      //基本信息的修改
      form.on('submit(follow_record_submit)', function (data) {
        for (var key in data.field) {
          if (data.field[key] === '')
            delete data.field[key]
        }
        var followRecordAll = {};
        data.field["id"] = frIdStore    //随访记录id
        data.field["mrId"] = mrIdStore    //随访档案id

        $.each(data.field,function (key,val){
          if(followRecordContent.includes(key)){
            followRecordAll[key] = val;
          }
        })
        followRecordAll['state'] = 1
        $.ajax({
          url: `${url_basic}/followRecord/update`,
          type: "POST",
          data: JSON.stringify(followRecordAll),
          contentType: 'application/json',
          success: function (data, textStatus) {

            if (data.code == 0) {
              layer.msg('基本信息修改成功', { time: 0.5 * 1000 }, function () { });
              return true;
            }
            else {
              layer.msg('失败，原因：' + data.msg);
              return false;
            }
          },
          error: function (xhr, errorText, errorType) {
            //console.log(errorType)
            layer.msg('修改失败（与服务器连接失败）');
          },
          dataType: "json"
        })
        return false;
      });
        

      form.on('submit(save_wirefollow)',function(data){
        ////console.log(data_origin_lable)
        var data_send = data_origin_lable
        var wirefollowinfo={}
        for (var key in data_send) {
          if (data_send[key] === '')
            delete data_send[key]
        }
        for (var key in data.field) {
          if (data.field[key] === '')
            delete data.field[key]
        }
        var position_set=['raWireFollowRecord','rvWireFollowRecord','lvWireFollowRecord']
        wirefollowinfo['raWireFollowRecord'] = {}
        wirefollowinfo['rvWireFollowRecord'] = {}
        wirefollowinfo['lvWireFollowRecord'] = {}

        data.field["frId"] = frIdStore    //随访档案id
        var frwirerecord_change={}  //要改的

        $.each(data.field,function (key,val){
          if(followRecordWirecontent_1.includes(key)){
            wirefollowinfo.raWireFollowRecord[key]=val;
          }
          if(followRecordWirecontent_2.includes(key)){
            wirefollowinfo.rvWireFollowRecord[key]=val;
          }
          if(followRecordWirecontent_3.includes(key)){
            wirefollowinfo.lvWireFollowRecord[key]=val;
          }
        })

        var followRecordWirecontent = ['thresholds','pulsewidth','prwave','pacingImpedance','pacingPercent','perceptualPercent','defibrillationImpedance','tdpw','perceptualSensitivity','note'] 
        var contentname=''
        //处理改的
        if (data_origin_lable.raWireFollowRecord!=0){   //以前有ra，并且要改
          frwirerecord_change["raWireFollowRecord"] = {}
          $.each(wirefollowinfo.raWireFollowRecord,function (key,val){
            contentname=key.split("_")[0]
            frwirerecord_change.raWireFollowRecord[contentname]=val
          })
          frwirerecord_change.raWireFollowRecord['frId']=frIdStore
          frwirerecord_change.raWireFollowRecord['id']=raIdStore
          frwirerecord_change.raWireFollowRecord['position']=1
        }
        if (data_origin_lable.rvWireFollowRecord!=0){   //以前有rv，并且要改
          frwirerecord_change["rvWireFollowRecord"] = {}
          $.each(wirefollowinfo.rvWireFollowRecord,function (key,val){
            contentname=key.split("_")[0]
            frwirerecord_change.rvWireFollowRecord[contentname]=val
          })
          frwirerecord_change.rvWireFollowRecord['frId']=frIdStore
          frwirerecord_change.rvWireFollowRecord['id']=rvIdStore
          frwirerecord_change.rvWireFollowRecord['position']=2
        }
        if (data_origin_lable.lvWireFollowRecord!=0){   //以前有lv，并且要改
          frwirerecord_change["lvWireFollowRecord"] = {}
          $.each(wirefollowinfo.lvWireFollowRecord,function (key,val){
            contentname=key.split("_")[0]
            frwirerecord_change.lvWireFollowRecord[contentname]=val
          })
          frwirerecord_change.lvWireFollowRecord['frId']=frIdStore
          frwirerecord_change.lvWireFollowRecord['id']=lvIdStore
          frwirerecord_change.lvWireFollowRecord['position']=3
        }

        //开始向后端传值
          //首先调用改的接口
        if (!(Object.prototype.isPrototypeOf(frwirerecord_change) && Object.keys(frwirerecord_change).length === 0)){
          ////console.log(frwirerecord_change)
          $.ajax({
              url: `${url_basic}/wireFollowRecord/updateWire`,
              type: "POST",
              data: JSON.stringify(frwirerecord_change),
              contentType: 'application/json',
              success: function (data, textStatus) {
                if (data.code == 0) {
                  layer.msg('成功', { time: 0.5 * 1000 }, function () {
                  });
                  return true;
                }
                else {
                  layer.msg('修改失败，原因：' + data.msg);
                  return false;
                }
              },
              error: function (xhr, errorText, errorType) {
                //console.log(errorType)
                layer.msg('修改电极信息失败（与服务器连接失败）');
              },
              dataType: "json"
            })
        }
      });
    
      //额外信息：心脏超声
      form.on('submit(save_heart)',function(data){
        var data_heart_send = data_origin_lable
        var heart_is_send = 0 //原来是否有额外心脏超声信息,默认无=0
        var heart_is= 0       //现在是否有额外心脏超声信息,默认无=0
        var heart_data={}
        if(hrIdStore!=0){//有=1
          heart_is_send=1
        }
        if(document.getElementById("more_heartsound").checked){//有=1
          heart_is= 1         
        }
        //保留心脏超声的当前数据
        $.each(data.field,function (key,val){
          if(heartUltrasoundContent.includes(key)){
            heart_data[key]=val
          }
        })
        heart_data["note"]=heart_data["note_4"]
        delete heart_data["note_4"]
        heart_data["id"]=hrIdStore
        heart_data["frId"]=frIdStore
        if(heart_is_send&&heart_is){//修改
          $.ajax({
            url: `${url_basic}/heartUltrasound/update`,
            type: "POST",
            data: JSON.stringify(heart_data),
            contentType: 'application/json',
            success: function (data, textStatus) {
              if (data.code == 0) {
                layer.msg('附加信息修改成功', { time: 0.5 * 1000 }, function () { });
                return true;
              }
              else {
                layer.msg('失败，原因：' + data.msg);
                return false;
              }
            },
            error: function (xhr, errorText, errorType) {
              //console.log(errorType)
              layer.msg('修改失败（与服务器连接失败）');
            },
            dataType: "json"
          })
        }
        /*
        //我觉得这个页面够呛能新增吧
        else if(!heart_is_send&&heart_is){//增加
          //由于当hrIdstore字段undefined时，heart_data["id"]也是undefined，即没有该字段
          //console.log(JSON.stringify(heart_data))
          $.ajax({
            url: `${url_basic}/heartUltrasound/add`,
            type: "POST",
            data: JSON.stringify(heart_data),
            contentType: 'application/json',
            success: function (data, textStatus) {
              //console.logde == 0) {
                layer.msg('附加信息添加成功', { time: 0.5 * 1000 }, function () { });
                return true;
              }
              else {
                layer.msg('失败，原因：' + data.msg);
                return false;
              }
            },
            error: function (xhr, errorText, errorType) {
              console.log(errorType)
              //console.log修改失败（与服务器连接失败）');
            },//console.log
            co//console.logction () {
            },
            dataType: "json"
          })
        }
        */
        else if(heart_is_send&&!heart_is){//删除
          var data_delete=[]
          data_delete.push(hrIdStore)
          $.ajax({
            url: `${url_basic}/heartUltrasound/delete`,
            type: "POST",
            data: JSON.stringify(data_delete),
            contentType: 'application/json',
            success: function (data, textStatus) {
              if (data.code == 0) {
                layer.msg('附加信息删除成功', { time: 0.5 * 1000 }, function () { });
                return true;
              }
              else {
                layer.msg('失败，原因：' + data.msg);
                return false;
              }
            },
            error: function (xhr, errorText, errorType) {
              console.log(errorType)
              layer.msg('修改失败（与服务器连接失败）');
            },
            da//console.logon"
          })
        }
        else{//无
        }
      });
    
    });

    Date.prototype.format = function(fmt) { 
      var o = { 
          "M+" : this.getMonth()+1,                 //月份 
          "d+" : this.getDate(),                    //日 
          "h+" : this.getHours(),                   //小时 
          "m+" : this.getMinutes(),                 //分 
          "s+" : this.getSeconds(),                 //秒 
          "q+" : Math.floor((this.getMonth()+3)/3), //季度 
          "S"  : this.getMilliseconds()             //毫秒 
      }; 
      if(/(y+)/.test(fmt)) {
              fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 
      }
      for(var k in o) {
          if(new RegExp("("+ k +")").test(fmt)){
              fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
          }
      }
      return fmt; 
    }
    
    function setDataLable(data,mrId,privilege) {
      this_privilege = privilege
      data_origin_lable=data
      if (data.nothing==1){
        $('#nofr').removeClass('layui-hide')
        $('#hadfr').addClass('layui-hide')
      }
      frIdStore = data.follow_record.id

      mrIdStore=mrId
      setListLable(frIdStore);

      document.getElementById('more_frCount').value = data.follow_record.frCount
      document.getElementById('more_date').value = (new  Date(data.follow_record.date)).format("yyyy-MM-dd hh:mm:ss")
      document.getElementById('more_doctor').value = data.follow_record.doctor
      document.getElementById('more_performance').value = data.follow_record.performance
      document.getElementById('more_batteryLife').value = data.follow_record.batteryLife
      document.getElementById('more_minFrequency').value = data.follow_record.minFrequency
      document.getElementById('more_maxFrequency').value = data.follow_record.maxFrequency
      document.getElementById('more_pacemakerPattern').value = data.follow_record.pacemakerPattern
      document.getElementById('more_volts').value = data.follow_record.volts
      document.getElementById('more_lqElectricity').value = data.follow_record.lqElectricity
      document.getElementById('more_note').value = data.follow_record.note
      document.getElementById('more_suggest').value = data.follow_record.suggest
      document.getElementById('stateNote').value = data.follow_record.stateNote
      //医生评价
      if(data.follow_record.comment==1){
        $('input:radio[name=comment]')[0].checked = false;  //设置正常为不选中
        $('input:radio[name=comment]')[1].checked = true;  //设置很好为选中
        $('input:radio[name=comment]')[2].checked = false;  //设置很差为不选中
      }
      if(data.follow_record.comment==2){
        $('input:radio[name=comment]')[0].checked = false;  //设置正常为不选中
        $('input:radio[name=comment]')[1].checked = false;  //设置很好为选中
        $('input:radio[name=comment]')[2].checked = true;  //设置很差为不选中
      }
      //随访种类
      if (data.follow_record.type==1){
        $('input:radio[name=type]')[0].checked = false  //设置常规随访为不选中
        $('input:radio[name=type]')[1].checked = true;  //设置不适随访为选中
      }
      //电池状态
      if (data.follow_record.batteryState==1){
        $('input:radio[name=batteryState]')[0].checked = false  //设置常规随访为不选中
        $('input:radio[name=batteryState]')[1].checked = true;  //设置不适随访为选中
      } 
      //照片
      if(data.follow_record.image!=null){
        $('#baseimg')[0].src=data.follow_record.image
        $('.baseimg').css('height',height)
      }
      else{
        $('#baseimg')[0].src = "/images/no_image.png"
        $('.baseimg').css('height',height)
      }
      //电极信息
      //右心房是否记录
      if (data.raWireFollowRecord!=0){
        $('#more_wirePosition_1').removeClass('layui-hide')
        // $('input:checkbox[name=wirePosition]')[0].checked = true
        raIdStore=data.raWireFollowRecord.id
        document.getElementById('more_thresholds_1').value = data.raWireFollowRecord.thresholds
        document.getElementById('more_pulsewidth_1').value = data.raWireFollowRecord.pulsewidth
        document.getElementById('more_prwave_1').value = data.raWireFollowRecord.prwave
        document.getElementById('more_pacingImpedance_1').value = data.raWireFollowRecord.pacingImpedance
        document.getElementById('more_pacingPercent_1').value = data.raWireFollowRecord.pacingPercent
        document.getElementById('more_perceptualPercent_1').value = data.raWireFollowRecord.perceptualPercent
        document.getElementById('more_defibrillationImpedance_1').value = data.raWireFollowRecord.defibrillationImpedance
        document.getElementById('more_tdpw_1').value = data.raWireFollowRecord.tdpw
        document.getElementById('more_perceptualSensitivity_1').value = data.raWireFollowRecord.perceptualSensitivity
        document.getElementById('more_note_1').value = data.raWireFollowRecord.note
      }
      //右心室是否记录
      if (data.rvWireFollowRecord!=0){
        $('#more_wirePosition_2').removeClass('layui-hide')
        // $('input:checkbox[name=wirePosition]')[1].checked = true
        rvIdStore=data.rvWireFollowRecord.id
        document.getElementById('more_thresholds_2').value = data.rvWireFollowRecord.thresholds
        document.getElementById('more_pulsewidth_2').value = data.rvWireFollowRecord.pulsewidth
        document.getElementById('more_prwave_2').value = data.rvWireFollowRecord.prwave
        document.getElementById('more_pacingImpedance_2').value = data.rvWireFollowRecord.pacingImpedance
        document.getElementById('more_pacingPercent_2').value = data.rvWireFollowRecord.pacingPercent
        document.getElementById('more_perceptualPercent_2').value = data.rvWireFollowRecord.perceptualPercent
        document.getElementById('more_defibrillationImpedance_2').value = data.rvWireFollowRecord.defibrillationImpedance
        document.getElementById('more_tdpw_2').value = data.rvWireFollowRecord.tdpw
        document.getElementById('more_perceptualSensitivity_2').value = data.rvWireFollowRecord.perceptualSensitivity
        document.getElementById('more_note_2').value = data.rvWireFollowRecord.note
      }
      //左心室是否记录
      if (data.lvWireFollowRecord!=0){
        $('#more_wirePosition_3').removeClass('layui-hide')
        // $('input:checkbox[name=wirePosition]')[2].checked = true
        lvIdStore=data.lvWireFollowRecord.id
        document.getElementById('more_thresholds_3').value = data.lvWireFollowRecord.thresholds
        document.getElementById('more_pulsewidth_3').value = data.lvWireFollowRecord.pulsewidth
        document.getElementById('more_prwave_3').value = data.lvWireFollowRecord.prwave
        document.getElementById('more_pacingImpedance_3').value = data.lvWireFollowRecord.pacingImpedance
        document.getElementById('more_pacingPercent_3').value = data.lvWireFollowRecord.pacingPercent
        document.getElementById('more_perceptualPercent_3').value = data.lvWireFollowRecord.perceptualPercent
        document.getElementById('more_defibrillationImpedance_3').value = data.lvWireFollowRecord.defibrillationImpedance
        document.getElementById('more_tdpw_3').value = data.lvWireFollowRecord.tdpw
        document.getElementById('more_perceptualSensitivity_3').value = data.lvWireFollowRecord.perceptualSensitivity
        document.getElementById('more_note_3').value = data.lvWireFollowRecord.note
      }
      //心脏超声是否记录(没有照片我就不显示这个了，没有照片那根本没法标注，显示起来没有意义吧？)
      if (data.heartUltrasound!=0){
        $('input:checkbox[name=more_info]')[0].checked = true
        //查看有没有更多信息的图片
        if(data.heartUltrasound.image !=null){
          $(`#nomoreinfo`).addClass('layui-hide')
          $(`#havemoreinfo`).removeClass('layui-hide')
          $('#hrimg')[0].src=data.heartUltrasound.image
          $('.hrimg').css('height',height)
          $('#more_heartsound').attr('checked', true)
          $("#more_heartUltrasound").removeClass("layui-hide")
          haveur=1
          hrIdStore=data.heartUltrasound.id
          document.getElementById('la').value = data.heartUltrasound.la
          document.getElementById('lv').value = data.heartUltrasound.lv
          document.getElementById('ra').value = data.heartUltrasound.ra
          document.getElementById('rv').value = data.heartUltrasound.rv
          document.getElementById('fs').value = data.heartUltrasound.fs
          document.getElementById('ef').value = data.heartUltrasound.ef
          document.getElementById('heart_note').value = data.heartUltrasound.note
          if (data.heartUltrasound.heartSize==2){
            $('input:radio[name=heartSize]')[0].checked = false 
            $('input:radio[name=heartSize]')[1].checked = true 
          }
          if (data.heartUltrasound.heartSize==3){
            $('input:radio[name=heartSize]')[0].checked = false 
            $('input:radio[name=heartSize]')[2].checked = true 
          }
          if (data.heartUltrasound.las==2){
            $('input:radio[name=las]')[0].checked = false 
            $('input:radio[name=las]')[1].checked = false 
          }
          if (data.heartUltrasound.lvs==2){
            $('input:radio[name=lvs]')[0].checked = false 
            $('input:radio[name=lvs]')[1].checked = false 
          }
          if (data.heartUltrasound.ras==2){
            $('input:radio[name=ras]')[0].checked = false 
            $('input:radio[name=ras]')[1].checked = false 
          }
          if (data.heartUltrasound.rvs==2){
            $('input:radio[name=rvs]')[0].checked = false 
            $('input:radio[name=rvs]')[1].checked = false 
          }
          if (data.heartUltrasound.fss==2){
            $('input:radio[name=fss]')[0].checked = false 
            $('input:radio[name=fss]')[1].checked = false 
          }
          if (data.heartUltrasound.efs==2){
            $('input:radio[name=efs]')[0].checked = false 
            $('input:radio[name=efs]')[1].checked = false 
          }
        }
        else{
          $(`#nomoreinfo`).removeClass('layui-hide')
          $(`#havemoreinfo`).addClass('layui-hide')
          haveur=0
        }  
      }
      //没有心脏的记录
      if(data.heartUltrasound==0){
        $(`#nomoreinfo`).removeClass('layui-hide')
          $(`#havemoreinfo`).addClass('layui-hide')
          haveur=0
      }


      //页面初始化的状态
      $(`#moreinfo`).hide()
      $(`#showbasicbutton`).hide()
      $(`#tochangestate`).hide()
      $("#showchange").show()

      
      layui.form.render()
    };



</script>
</html>